// Copyright 2013 Google Inc. All Rights Reserved.
//
// Define nacl_abi_timeval and its conversion functions.
//
// Note that nacl-glibc's timeval is as same as NaCl IRT's. In
// bionic, tv_sec and tv_usec is 32bit values so we need conversion.
//

#include <stdint.h>
#include <sys/time.h>

struct nacl_abi_timeval {
  int64_t tv_sec;
  int64_t tv_usec;
};

void __nacl_abi_timeval_to_timeval(struct nacl_abi_timeval *nacl_timeval,
                                   struct timeval *timeval);

void __timeval_to_nacl_abi_timeval(struct timeval *timeval,
                                   struct nacl_abi_timeval *nacl_timeval);
